package com.dmai.capacity.platform.oauth.common.exception;

import org.springframework.security.oauth2.common.exceptions.OAuth2Exception;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import lombok.Getter;


/**
 * 自定义OAuth2Exception
 */
@SuppressWarnings("all")
@JsonSerialize(using = OAuth2ExceptionSerializer.class)
public class DefaultOAuth2Exception extends OAuth2Exception {

	@Getter
	private String errorCode;
	
	@Getter
	private Integer code;

	public DefaultOAuth2Exception(String msg) {
		super(msg);
	}

	public DefaultOAuth2Exception(String msg, String errorCode, Integer status) {
		super(msg);
		this.errorCode = errorCode;
		this.code = status ;
	}
}
